package com.lingnan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingnan.entity.po.JobApplication;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

// JobApplicationMapper.java
@Mapper
public interface JobApplicationMapper extends BaseMapper<JobApplication> {
    
    /**
     * 根据求职者ID查询投递记录
     */
    @Select("SELECT * FROM job_application WHERE seeker_id = #{seekerId}")
    List<JobApplication> selectBySeekerIdd(@Param("seekerId") Long seekerId);
    
    /**
     * 根据简历ID查询投递记录
     */
    @Select("SELECT * FROM job_application WHERE resume_id = #{resumeId}")
    List<JobApplication> selectByResumeId(@Param("resumeId") Long resumeId);
}
